function [LocationError_min,LocationError_avg] = calculateLocationErrorAvg(InterferencePostion,InterferencePostion_detected)
    InterferenceNum = size(InterferencePostion,1);%真实干扰源数量
    InterferencePostion_detected = sortrows(InterferencePostion_detected);  %干扰源定位结果重新排序
    InterferenceNum_detected = size(InterferencePostion_detected,1);%干扰源检测数量
    InterfencePostion_XY = sortrows(InterferencePostion(:,1:2));  %干扰源位置重新排序
    for m= 1: InterferenceNum_detected
        for n = 1: InterferenceNum
            LocationError(m,n)=calculateDistance(InterferencePostion_detected(m,1),InterferencePostion_detected(m,2),InterfencePostion_XY(n,1),InterfencePostion_XY(n,2));
        end
    end
    LocationError_min = min(LocationError,[],2);   %计算每个干扰源定位结果到干扰源位置的最小距离
    LocationError_avg = mean(LocationError_min);   %计算所有干扰源定位结果的平均误差
    
end